<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<script>

   var strVariable = "aaa";
alert(strVariable.link("http://www.microsoft.com"));		//	<a href="http://www.microsoft.com">aaa</a>
document.write(strVariable.link("http://www.microsoft.com"));		//	aaa
</script>	

</body>
</html>